package myapps.ttclient.protocol.message.drawingscreen;

import java.io.DataOutputStream;
import java.io.IOException;

import myapps.ttclient.GlobalVariables;
import myapps.ttclient.baseclass_and_interface.TTClientMessage;

public class DSActionMessage extends TTClientMessage {

	public int action;
	public double x;
	public double y;
	
	public DSActionMessage(int action, double x, double y)
	{
		this.action = action;
		this.x = x;
		this.y = y;
	}
	
	@Override
	public void toDataOutputStream(DataOutputStream dos) throws IOException {
		
		dos.writeByte(DS_ACTION);
		dos.writeInt(GlobalVariables.NO_LENGTH_CODE);
		
		dos.writeByte(action);
		dos.writeDouble(x);
		dos.writeDouble(y);
		
	}

}
